package com.dynamixsoftware.printershare;

import android.content.Intent;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import com.dynamixsoftware.printershare.ActivityBase;
import com.dynamixsoftware.printershare.ActivityCalendar;
import com.dynamixsoftware.printershare.ActivityContacts;
import com.dynamixsoftware.printershare.ActivityDocsBrowser;
import com.dynamixsoftware.printershare.ActivityGDocsBrowser;
import com.dynamixsoftware.printershare.ActivityGmail;
import com.dynamixsoftware.printershare.ActivityMessages;
import com.dynamixsoftware.printershare.ActivityPrintCallLog;
import com.dynamixsoftware.printershare.ActivityPrintPictures;
import com.dynamixsoftware.printershare.ActivityWeb;
import com.dynamixsoftware.printershare.App;

public class ActivityMain extends ActivityBase {

	private void setOrientation(int var1) {
		byte var2 = 1;
		if (var1 != 3) {
			LinearLayout var3 = (LinearLayout) this.findViewById(2131230778);
			if (var1 != var2) {
				var2 = 0;
			}

			var3.setOrientation(var2);
		}
	}

	public void onConfigurationChanged(Configuration var1) {
		super.onConfigurationChanged(var1);
		this.setOrientation(var1.orientation);
	}

	public void onCreate(Bundle var1) {
		super.onCreate(var1);
		this.setContentView(2130903059);
		this.setOrientation(this.getResources().getConfiguration().orientation);
		this.setTitle(2131099668);
		((ImageButton) this.findViewById(2131230779)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityPrintPictures.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		((ImageButton) this.findViewById(2131230782)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityWeb.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		((ImageButton) this.findViewById(2131230780)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityContacts.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		((ImageButton) this.findViewById(2131230781)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityCalendar.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		ImageButton var2 = (ImageButton) this.findViewById(2131230784);
		var2.setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityPrintCallLog.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		if (!App.has_feature_call_log) {
			var2.setEnabled(false);
		}

		ImageButton var3 = (ImageButton) this.findViewById(2131230783);
		var3.setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityMessages.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		if (!App.has_feature_messages) {
			var3.setEnabled(false);
		}

		((ImageButton) this.findViewById(2131230785)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityGmail.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		((ImageButton) this.findViewById(2131230786)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityGDocsBrowser.class);
				ActivityMain.this.startActivity(var2);
			}
		});
		((ImageButton) this.findViewById(2131230787)).setOnClickListener(new OnClickListener() {
			public void onClick(View var1) {
				Intent var2 = new Intent();
				var2.setClass(ActivityMain.this, ActivityDocsBrowser.class);
				ActivityMain.this.startActivity(var2);
			}
		});
	}

	protected void onResume() {
		super.onResume();
		this.setTitle(this.getResources().getString(2131099668) + this.getTitleSuffix());
	}
}
